#include "utils.hpp"

#include <cctype>

namespace mashine { namespace utils {

bool is_variable_name(std::string & variable)
{
	BOOST_FOREACH(char ch, variable)
	{
		if (std::islower(ch)) return false;
	}
	
	return true;
}

bool is_constant_name(std::string & constant)
{
	BOOST_FOREACH(char ch, constant)
	{
		if (std::isupper(ch)) return false;
	}
	
	return true;
}

bool is_predicate_name(std::string & predicate)
{
	BOOST_FOREACH(char ch, predicate)
	{
		if (std::islower(ch)) return false;
	}
	
	return true;
}

bool is_analogy_name(std::string & analogy)
{
	BOOST_FOREACH(char ch, analogy)
	{
		if (std::isupper(ch)) return false;
	}
	
	return true;
}

}}